public class p9 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int targetN = 1000;

		int a, b, c;
		boolean stop = false;

		for (a = 1; a < targetN; a++) {
			for (b = a + 1; b < targetN; b++) {
				double tmp = Math.sqrt(a * a + b * b);
				c = (int) Math.floor(tmp);
				if (tmp - c == 0 && a + b + c == targetN) {
					stop = true;
					System.out.println(a + "," + b + "," + c);
					System.out.println(a * b * c);
					break;
				}
			}
			if (stop) {
				break;
			}
		}

	}

}
